package j2025.j03;

/**
 * @Author 猫大仙
 */
public class j0316 {
 public ListNode swapPairs(ListNode head) {
  if(head==null || head.next==null) return head;
  ListNode tmp = swapPairs(head.next.next);
  ListNode newHead = head.next;
  head.next = tmp;
  newHead.next = head;
  return newHead;
 }
}
